<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>类型转换</title>
		<script type="text/javascript">
			document.write(typeof(a));//undefined
			document.write("<br/>");
			document.write(typeof(undefined));//undefined
			document.write("<br/>");
			document.write(typeof(NaN));//number
			document.write("<br/>");
			document.write(typeof(null));//Object
			document.write("<br/>");
			var a = "123abc";
			document.write(typeof(+a));//number
			document.write("<br/>");
			document.write(typeof(!!a));//boolean
			document.write("<br/>");
			document.write(typeof(a+""));//string
			document.write("<br/>");
			document.write(1=='1');//true
			document.write("<br/>");
			document.write(NaN == NaN);//false
			document.write("<br/>");
			document.write(NaN == undefined);//false
			document.write("<br/>");
			document.write("11" + 11);//1111
			document.write("<br/>");
			document.write(parseInt("123abc"));//123
			document.write("<br/>");
			var num = 123123.345789;
			document.write(num.toFixed(2));//123123
			document.write("<br/>");
			document.write(typeof(typeof(a)));//string
		</script>
	</head>
	<body>
	</body>
</html>
